const {
  bubbleSort
} = require('../../../../src/js/algorithms/sorting/bubble-sort');
const {
  modifiedBubbleSort
} = require('../../../../src/js/algorithms/sorting/bubble-sort-improved');

function createNonSortedArray(size) {
  // 6
  const array = [];
  for (let i = size; i > 0; i--) {
    array.push(i);
  }
  return array;
}
let array1 = createNonSortedArray(5); // {7}
console.log(array1.join()); // {8}
array1 = bubbleSort(array1); // {9}
console.log(array1.join()); // {10}

let array2 = createNonSortedArray(5);
console.log(array2.join());
array2 = modifiedBubbleSort(array2);
console.log(array2.join());
